---
title: How to add a custom domain to Dub
updatedAt: 2023-07-26
summary: Learn how to add a custom domain to Dub for free - no credit card required.
author: steventey
categories:
  - custom-domains
  - getting-started
related:
  - how-to-redirect-root-domain
  - using-cloudflare-domains
  - what-is-a-project
---

Dub is the only link management tool that allows you to add a custom domain for free. On Dub, you can add as many domains as you want on all plans – including the free plan.

This guide will show you how to add a custom domain to Dub.

<Prerequisites>

Before you begin, you'll need the following:

- A Dub account. If you don't have one, you can [create one for free](https://app.dub.co/register).
- A domain name. If you don't have one, you can purchase one from any one of the following domain registrars:
  - [Namecheap](https://www.namecheap.com/)
  - [GoDaddy](https://www.godaddy.com/)
  - [Google Domains](https://domains.google/)
  - [Porkbun](https://porkbun.com/)

</Prerequisites>

## Step 1: Add a custom domain

First, [log in](https://app.dub.co/login) to your Dub account.

### Don't have a project yet?

1. Navigate to the [Dub Dashboard](https://app.dub.co/) and click on the **Create project** button.
2. Enter the domain you want to use under the "Shortlink domain" input and click **Create project**.

<Image
  alt="The project creation modal in Dub"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/create-project-modal.png"
  width={1315}
  height={871}
/>

### Already have a project?

If you already have a project and are looking to add another domain to it:

1. Navigate to your project's Domains page – you can do that by clicking on the **Domains** link in the menu bar at the top of your project dashboard.
2. Click on the **Add Domain** button.
3. Enter the domain you want to use and click **Add domain**.

<Image
  alt="The Add Domain modal in Dub"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/add-domain-modal.png"
  width={1143}
  height={797}
/>

## Step 2: Configure your domain

After adding your domain, you'll be presented with a DNS record that you'll need to add to your domain's DNS settings.

<Image
  alt="Setting up DNS records for your domains on Dub"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/domain-dns-records.png"
  width={1054}
  height={625}
/>

### Adding an apex domain

If you're adding an apex domain (e.g. `example.com`), you'll need to add an `A` record with the following values:

- **Name**: `@` (or leave it blank)
- **Value**: `76.76.21.21`
- **TTL**: `86400` (or the highest value possible)

### Adding a subdomain

If you're adding a subdomain (e.g. `go.example.com`), you'll need to add a `CNAME` record with the following values:

- **Name**: `go` (or whatever subdomain you want to use)
- **Value**: `cname.dub.co`
- **TTL**: `86400` (or the highest value possible)

<Note variant="warning">
  If you're using Cloudflare as your DNS provider, you might need to configure
  some extra steps for it to work properly. Please refer to our guide on [using
  Cloudflare domains with Dub](using-cloudflare-domains) for more information.
</Note>

## Step 3 (optional): Verify domain ownership

<Note variant="info">
  This step is only applicable if you are adding a domain that is currently
  being used on [Vercel](https://vercel.com/).
</Note>

Since we use Vercel as the DNS provider for Dub, you'll need to verify that you own the domain before you can add it to your Dub project.

<Image
  alt="Verifying domain ownership on Dub"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/domain-txt-verification.png"
  width={1056}
  height={616}
/>

To do that, you'll need to add a TXT record with the following values:

- **Name**: `_vercel`
- **Value**: `vc-domain-verify=...` (the value will be provided to you on the Dub dashboard)

<Note variant="warning">
  Warning: If you are using this domain for another site, setting this TXT
  record will transfer domain ownership away from that site and break it. Please
  exercise caution when setting this record.
</Note>

## How long do I have to wait for my domain to work?

Domain configuration can take anywhere between 1 to 24 hours to complete. If your domain still doesn't work after 24 hours, please [send us an email](mailto:support@dub.co?subject=Domain%20not%20working) and we'll be happy to help you out.
